package com.ktg.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ktg.ktgcommon.domain.wms.WmWarehouse;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface WasMapper {
    @Insert({
            "INSERT INTO wm_warehouse (warehouse_code, warehouse_name, location, area, charge, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time) ",
            "VALUES (#{warehouseCode}, #{warehouseName}, #{location}, #{area}, #{charge}, #{enableFlag}, #{remark}, #{attr1}, #{attr2}, #{attr3}, #{attr4}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime})"
    })
    public Integer addWas(WmWarehouse wmWarehouse);
    public Page<WmWarehouse> getByWasPage(Page<WmWarehouse> page,@Param("wmWarehouse") WmWarehouse wmWarehouse);

    @Select("select * from wm_warehouse where warehouse_id = #{warehouseId}")
    public WmWarehouse selectById(@Param("warehouseId") Integer warehouseId);
    int editWas(WmWarehouse wmWarehouse);
}
